//
//  GXNewsCell.m
//  YIChuSeller
//
//  Created by 田小椿 on 2018/12/11.
//  Copyright © 2018年 xiangshengjun. All rights reserved.
//

#import "GXNewsCell.h"
@interface GXNewsCell ()
@property (weak, nonatomic) IBOutlet UILabel *orderTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentDetailLabel;
@property (weak, nonatomic) IBOutlet UIButton *detailButton;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;
@property (weak, nonatomic) IBOutlet UIImageView *nextImageView;

@end
@implementation GXNewsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}
- (void)setModel:(GXNewsModel *)model
{
    _model = model;
    self.orderTitleLabel.text = model.theme;
    self.timeLabel.text = model.birthTime;
    self.contentDetailLabel.text = model.message;
    if ([model.staledated isEqualToString:@"1"]) {
        self.detailButton.enabled = NO;
        self.nextImageView.hidden = YES;
        self.detailLabel.text= @"已过期";
        [self.detailLabel setTextColor:[UIColor whiteColor]];
        [self.detailLabel setBackgroundColor:[UIColor lightGrayColor]];
        [self.detailLabel setTextAlignment:NSTextAlignmentCenter];
        [self.detailLabel setFont: [UIFont systemFontOfSize:11]];
        self.detailLabel.layer.masksToBounds = YES;
        self.detailLabel.layer.cornerRadius = 3;
    }
}


- (IBAction)pressDetailButton:(UIButton *)sender {
}

@end
